<?php
if(!defined('IN_THANKPHP_SYSTEM')) exit('Access Denied!');

class loader{
	function init() {
		return new self;
	}
	
	function loadClass(){
		
	}
	
	function loadConfig($fileName){
		//print $fileName;return;
		$fp = fopen($fileName, 'r');
		$config = array();
		while (!feof($fp)) {
			$line = fgets($fp);
			#以#开头
			if(preg_match("/^\s*#.*$/", $line)) continue;
			#空白行
			if(preg_match("/^\s*$/", $line)) continue;
			
			if(preg_match("/^.*\S+.*#.*$/", $line)){
				$fits = preg_grep("/^(.*\S+.*)#.*$/", $line);
				print_r($fits);
			}
	
			print $line.'<br>';
			/*
			$fits = preg_grep("/^(.*)#*.*$/", $line);
			$line = $fits[0];
			$fits = preg_grep("/^.*[].*$/", $line);
			$line = $fits[0];
			if(!$line)continue;
			*/
		}
		fclose($fp);
	}
}